package com.summer.safe.system.service;

import com.summer.safe.base.BaseService;
import com.summer.safe.base.Page;
import com.summer.safe.system.dao.RoleDao;
import com.summer.safe.system.entity.Role;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 权限
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class RoleService extends BaseService<RoleDao, Role> {


    @Override
    public Role get(String id) {
        return super.get(id);
    }

    @Override
    public List<Role> findList(Role role) {
        return dao.findAllList(role);
    }

    @Override
    public Page<Role> findPage(Page<Role> page, Role role) {
        page.setList(this.findList(role));
        return page;
    }

    @Override
    public void save(Role role) {
        super.save(role);
    }

    @Override
    public void delete(Role role) {
        super.delete(role);
    }
}
